home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d13
/
patch12.arc
/
GETSWITC.C
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
C/C++ Source or Header
|
1990-10-02
|
290 b
|
17 lines
#include <stdio.h>
#include <dos.h>
static char SW = 0; /* DOS switch character, either '-' or '/' */
int
getswitch()
{
if (SW == 0) {
/* get SW using dos call 0x37 */
_AX = 0x3700;
geninterrupt(0x21);
SW = _DL;
}
return( SW & 0xFF );
}